home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC 2000 February
/
LogicCd--feb.2000-mac-cdr.iso
/
Apple II
/
STRIPPER.FOLDER
/
UU.DOX
< prev
Wrap
Text File
|
1990-04-02
|
7KB
|
145 lines
UUencode/decode v 1.1 by Andy Tefft 1/91
This program is freeware. Distribute all you want, but don't
modify. If you find it useful, feel free to send me money --
this might even encourage further development.
UU is a SYS file which should run on any // which runs ProDOS. It
doesn't use extended memory or any enhanced ROM calls, and is
designed for 40 column use. Only one disk drive is required,
although it will not allow disk swaps, so both the input and
output files must be online at the same time (/ram can be used).
Main Menu commands:
P)refix change: This allows you to select the prefix used for
file access. Entering / allows you to select the volume name
of the last accessed device, regardless of its name. You can
enter any valid prefix, whether a full path name (starting with
a / and a volume name), or a partial path name (which is appended
to the current prefix).
M)ode (permission) change (encode): This allows you to query or change
the Unix-style permission mask (not used by the Apple). Default
is 644 and will usually not be changed. Hit RETURN when asked
to leave this value unchanged. The value you set will be used
until you change it or restart the program. You can enter up
to 4 characters; there is no validity check on the entered value;
anything longer than 4 characters will be truncated to 4.
T)ype & auxtype change (decode): This allows you to query or
change the filetype and auxtype of the file that will be created
when you decode a file. Defaults are BIN and $0000. You must enter
the type and auxtype as a hex value, without a $, with or without
leading 0's (max. length = 2 for type, 4 for auxtype). Hit
RETURN when asked to leave either value unchanged. There is no
validity check for these values, but they are displayed on the main
menu so you can check them for yourself. Again, values you enter
here will remain until you change them or restart the program.
L)inefeed after CR: This option is used only when encoding files.
If it is "yes", line terminators in the output file will be
the cr/lf combination; if it is "no" just a cr will be used.
sometimes cr/lf is referred to is "unix newline" mode. You
will only need to use this option if you are uploading to
a system which uses cr/lf terminators using xmodem or other
binary protocol (kermit in text mode will convert apple newlines
to cr/lf if needed).
Either cr or cr/lf line terminators should be decoded properly.
Other strange line terminators (lf/cr for example) may or may
not work.
G)rave to replace blanks: By default, when encoding a file
any blanks in the encoded data are replaced by the grave
accent (`). This is to prevent loss of trailing blanks,
etc. This option turns on or off this replacement.
Most uudecode programs should not have any problems with
the grave accents. Additionally, most will pad the ends of
lines that have been truncated with spaces while decoding. This
uudecode does both.
C)atalog: Displays a brief catalog listing. You will be prompted
for the directory to catalog. Hitting RETURN catalogs the prefix
directory. Entering control-c (or terminating your entry in
control-c) and return cancels the cataloging.
The catalog display lists the filenames, filetypes, file lengths
in blocks and bytes (decimal displays) and auxtypes in hex. It
pauses after every twenty entries displayed. Hitting control-c
will abort the display.
The full pathname of the directory being cataloged is listed
at the beginning of the display. The numbers of blocks used and
free on the device are shown after the display.
There should be no problems with directories of any size,
since only one block of the directory is read at a time.
E)ncode a file: This allows you to uuencode a file. You will be
asked for input and output paths. Hit RETURN in answer to either
question and you can return to the menu (you will be asked if you
want to; entering "N" will let you enter the filename again).
You can enter either a full or partial pathname for either file
(if you don't enter a starting /, prodos will prepend the current
prefix to what you type in). The name you enter for the input
file will be put into the begin line of the encoded file, so if
your input and output files will be on different volumes (both
must be online) or different directories on the same volume, you
will probably want to first set the prefix to the INPUT file's
prefix, and enter the full pathname for the output file. For example:
input file is /disk1/file, you want output to go to /disk2/file.uu.
first set prefix to /disk1/ (trailing slash optional); enter
"file" as input file, "/disk2/file.uu" as output file. UUedecode
will then call the output file "file" when you or someone else
decodes it.
If the output file exists already, you will be given the option
to delete it or not. If you say "no", you will be able to enter
a new output name; at this point you can return to the menu by
just hitting RETURN.
D)ecode a file: This will allow you to uudecode a file that
has been uuencoded. It will ask for the input file name;
it will then search through the input file for the "begin"
line which contains the output file name. You will be given
the option to change or use this name only if there is an error
with it. Judicious use of the prefix and full pathnames
may be needed to use more than one volume for decoding
(remember, both volumes must be online at the same time).
The only error checking done is to check for the presence of
an 'end' line. If one does not exist, you will be warned but
the output file will remain anyway.
Q)uit: allows you to quit. It asks first for verification and then
either returns to the menu or does a prodos quit.
Upcoming features:
I may include some support to repair some of the damage done by
some networks to some characters.
I forgot to put in an option to unlock and delete a locked file.
I'll see when I can get to that.
I am working on a file selection dialog, but that will limit pathnames
to 64 characters in length.
That's about all I can think of for now besides allowing entering
the 3-letter filetypes (which I don't plan on doing) instead of
hex numbers. Come to think of it, that might not be too much work.
Thanks to Albert Chin (acmfiu@fiu.edu) for the info regarding
the MLI calls.
Andy Tefft
99 E. Main St.
North East, PA 16428-1334
(814) 725-1344
(till May 12, '91: art100@psuvm.psu.edu)